package com.bs.dao.impl;

import java.util.List;

import org.hibernate.Query;

import com.bs.dao.BaseDao;
import com.bs.dao.UserDao;
import com.bs.entity.User;

public class UserinfoDaoImpl  extends BaseDao implements UserDao{

	@Override
	public User getUser(User user) {
		User tuser=null;
		String sql ="from User user where user.loginName =? and user.userPassword =?";
		List userlist =  hibernateTemplate.find(sql,new Object []{user.getLoginName(),user.getUserPassword()});
		if(userlist.size()>0){
			tuser =(User) userlist.get(0);
		}
		return tuser;
	}

	@Override
	public boolean save(User user) {
		return false;
	}

}
